import React, { Component } from 'react';
import { connect } from 'dva';
import styles from './searchCollection.less';
import getUrlParam from '@/utils/getUrlParam';
import { Tabs, Select } from 'antd';
import { BrowserRouter as Router, Route, NavLink, Redirect } from 'react-router-dom';
import regulatoryLetters from './childPages/regulatoryLetters';
import feedBack from './childPages/feedBack';
import lawsRegulations from './childPages/lawsRegulations';
import violationCases from './childPages/violationCases';
import router from 'umi/router';
// @connect(({ opwarning }) => ({
//   FDAbnormalData: opwarning.FDAbnormalData,
//   FSAbnormalData: opwarning.FSAbnormalData,
//   QpzsData: opwarning.QpzsData,
//   MajorFormData: opwarning.MajorFormData,
// }))
class searchCollection extends Component {
  componentDidMount() {
    router.push('/Law/searchCollection/regulatoryLetters');
    // const { dispatch } = this.props;
  }

  render() {
    const TabPane = Tabs.TabPane;
    const Option = Select.Option;

    return (
      <div className={styles.searchCollection}>
        <div className={[styles.breadCrumbContainer, 'clearfix'].join(' ')}>
          <NavLink to="/Law/ListContent" activeClassName={styles.actNav}>
            最新政策
          </NavLink>
          <NavLink to="/Law/NoticeTable" activeClassName={styles.actNav}>
            监管通知公告
          </NavLink>
          <NavLink to="/Law/SearchCollection" activeClassName={styles.actNav}>
            检索收藏
          </NavLink>
        </div>

        <div className={styles.contentWrap}>
          <div className={[styles.contentNav, 'clearfix'].join(' ')}>
            <NavLink to="/Law/SearchCollection/regulatoryLetters" activeClassName={styles.actNav}>
              监管函件
            </NavLink>

            <NavLink to="/Law/SearchCollection/feedBack" activeClassName={styles.actNav}>
              监管反馈
            </NavLink>

            <NavLink to="/Law/SearchCollection/violationCases" activeClassName={styles.actNav}>
              违规案例
            </NavLink>
          </div>
          <div className={styles.routeWrap}>
            <Route path="/Law/SearchCollection/regulatoryLetters" component={regulatoryLetters} />
            <Route path="/Law/SearchCollection/feedBack" component={feedBack} />
            <Route path="/Law/SearchCollection/lawsRegulations" component={lawsRegulations} />
            <Route path="/Law/SearchCollection/violationCases" component={violationCases} />
          </div>
        </div>
      </div>
    );
  }
}
export default searchCollection;
